package niit.wei.dao.impl;

import niit.wei.dao.CategoryDao;
import niit.wei.entity.Category;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * @Author WeiJinLong
 * @Date 2023-06-28 21:41
 * @Version 1.0
 */
public class CategoryDaoImpl extends BaseDao<Category> implements CategoryDao {
    @Override
    public List<Category> getAllCategories(Connection conn, String sql, Class<Category> clazz, Object... args) throws SQLException, NoSuchFieldException, InstantiationException, IllegalAccessException {
        return getList(conn, sql, clazz, args);
    }

    @Override
    public Category getCategory(Connection conn, String sql, Class<Category> clazz, Object... args) throws SQLException, NoSuchFieldException, InstantiationException, IllegalAccessException {
        return getOne(conn, sql, clazz, args);
    }
}
